home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presentation Library 1993 Spring / ARPL-Spring-93-Partner-Edition.iso / Applications / Graphics / Aldus IntelliDraw / IntelliDraw™ / IntelliDraw™.rsrc / STR#_20737.txt < prev    next >
Encoding:
Text File  |  1992-06-19  |  1.7 KB  |  97 lines

  1. /S_IMAGEMASKV3    {    
  2. /inv exch def 
  3. /h exch def    /w exch def 
  4. /dh exch def    /dw exch def 
  5. /y0 exch def    /x0 exch def 
  6. /AsBin exch def 
  7. /sx w dw div def 
  8. /sy h dh div def 
  9.  
  10.  
  11. /imbuf w 7 add 8 idiv string def 
  12. x0 y0 translate w h inv [sx 0 0 sy 0 0] 
  13. {currentfile imbuf AsBin {readstring} {readhexstring} ifelse pop} imagemask 
  14. } def    
  15.  
  16.  
  17.  /S_IMAGEV3    {    
  18.  
  19.  
  20.  /bits exch def 
  21.  /h exch def    /w exch def 
  22.  /dh exch def    /dw exch def 
  23.  /y0 exch def    /x0 exch def 
  24.  /AsBin exch def 
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  /sx w dw div def 
  36.  /sy h dh div def 
  37.  
  38.  
  39.  /imbuf w bits mul 7 add 8 idiv string def 
  40.  x0 y0 translate w h bits [sx 0 0 sy 0 0] 
  41.  {currentfile imbuf AsBin {readstring} {readhexstring} ifelse pop} 
  42.  
  43.  { abs exch abs 2 copy add 1 gt {1 sub dup mul  exch 1 sub dup mul add 1 sub }{ dup mul exch  dup mul add 1 exch sub } ifelse } 
  44.  
  45. {exch pop abs 1 exch sub}
  46.  
  47.  
  48.  
  49. counttomark dup 3 add -1 roll exch
  50. 2 sub mul dup floor cvi
  51. dup 3 1 roll sub exch dup
  52.  
  53.  
  54. 3 add index exch 2 add index dup
  55. 4 1 roll sub mul add
  56. counttomark 1 add 1 roll cleartomark}
  57.  
  58.  
  59. /S_RGBIMAGE    {    
  60. /bits exch def 
  61. /h exch def    /w exch def 
  62. /dh exch def    /dw exch def 
  63. /y0 exch def    /x0 exch def 
  64. /AsBin exch def 
  65. /sx w dw div def 
  66. /sy h dh div def 
  67.  
  68.  
  69. /imbuf w bits mul 3 mul 7 add 8 idiv string def 
  70. x0 y0 translate w h bits [sx 0 0 sy 0 0] 
  71. {currentfile imbuf AsBin {readstring} {readhexstring} ifelse pop} false 3 colorimage 
  72. } def    
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. DFLT
  80.  
  81. /S_CMYKIMAGE    {    
  82. /bits exch def 
  83. /h exch def    /w exch def 
  84. /dh exch def    /dw exch def 
  85. /y0 exch def    /x0 exch def 
  86. /AsBin exch def 
  87. /sx w dw div def 
  88. /sy h dh div def 
  89.  
  90.  
  91. /imbuf w bits mul 4 mul 7 add 8 idiv string def 
  92. x0 y0 translate w h bits [sx 0 0 sy 0 0] 
  93. {currentfile imbuf AsBin {readstring} {readhexstring} ifelse pop} false 4 colorimage 
  94. } def    
  95.  
  96.  
  97.